unit Uptimes;

interface

function UserUptime: Cardinal;
function SystemUptime: Cardinal;

implementation

uses
 Windows;

function UserUptime: Cardinal;
 var
  LII: TLastInputInfo;
begin
 FillChar(LII, SizeOf(TLastInputInfo), #0);
 LII.cbSize:=SizeOf(TLastInputInfo);
 GetLastInputInfo(LII);
 Result:=LII.dwTime;
end;

function SystemUptime: Cardinal;
begin
 Result:=GetTickCount div 1000;
end;

end.
